 function createLoginAdmin(){

  /*
   * CREAMOS LOS ELEMENTOS NECESARIOS
   */
 
  var background=document.createElement("div");
  background.id="lgnBackground";
  background.style.position="absolute";
  background.style.opacity=".5";
  background.style.top="0";
  background.style.left="0";
  background.style.height="100%";
  background.style.width="100%";
  background.style.background="#547c9d";
  background.style.display="none";

  var height=78;
  var width=330;
  var left=window.innerWidth/2-width/2;
  var top=window.innerHeight/2-height/2;
  var dialog=document.createElement("div");
  dialog.id="lgnDialog";
  dialog.style.position="absolute";
  dialog.style.height=height;
  dialog.style.width=width;
  dialog.style.top=top;
  dialog.style.left=left;
  dialog.style.background="#ffb56c";
  dialog.style.borderTop="5px solid #ff932a";
  dialog.style.borderBottom="5px solid #ff932a";
  dialog.style.display="none";

  var input=document.createElement("input");
  input.style.margin="10px";
  input.style.backgroundColor="#ffb56c";
  input.style.border="1px solid #ff932a";
  input.style.width="150px";
  input.style.color="white";
  input.style.height="19px";
  
  var inputUser=input.cloneNode(true);
  inputUser.id="lgnInputUser";
  var inputPass=input.cloneNode(true);
  inputPass.id="lgnInputPass";
  inputPass.type="password";
  inputPass.style.marginLeft="0";

  var inputSend=document.createElement("div");
  inputSend.id="lgnInputSend";
  inputSend.style.backgroundColor="#ffb56c";
  inputSend.style.border="1px solid #ff932a";
  inputSend.style.color="white";
  inputSend.style.widht="310px";
  inputSend.style.margin="10px";
  inputSend.style.textAlign="center";
  inputSend.style.cursor="pointer";
  inputSend.style.marginTop="0";
  inputSend.style.height="19px";
  
  var inputSendText=document.createTextNode("Acceder");

  var logBut=document.createElement("div");
  logBut.style.cssFloat="right";
  logBut.style.position="relative";
  logBut.style.top="-60px";
  logBut.style.cursor="default";
  logBut.style.width="5px";
  logBut.style.height="5px";
  logBut.style.backgroundColor="#547c9d";
  logBut.onclick=inLoginAdmin;

  /*
   * ASOCIAMOS LOS EVENETOS A LOS ELEMENTOS
   */
   
  background.onclick=outLoginAdmin;
  inputUser.onmouseover=function(){lgnInputOver("lgnInputUser")};
  inputUser.onmouseout=function(){lgnInputOut("lgnInputUser")};
  inputPass.onmouseover=function(){lgnInputOver("lgnInputPass")};
  inputPass.onmouseout=function(){lgnInputOut("lgnInputPass")};
  inputSend.onmouseover=function(){lgnInputOver("lgnInputSend")};
  inputSend.onmouseout=function(){lgnInputOut("lgnInputSend")};
  
  /*
   * SITUAMOS LOS ELEMENTOS 
   */
   
  document.body.appendChild(background);
  document.body.appendChild(dialog);
  dialog.appendChild(inputUser);
  dialog.appendChild(inputPass);
  dialog.appendChild(inputSend);
  inputSend.appendChild(inputSendText);
  document.getElementById("est_top").appendChild(logBut);
 }

 function inLoginAdmin(){
  var background=document.getElementById("lgnBackground");
  var dialog=document.getElementById("lgnDialog");
  background.style.display="block";
  dialog.style.display="block";
 }

 function outLoginAdmin(){
  var background=document.getElementById("lgnBackground");
  var dialog=document.getElementById("lgnDialog");
  background.style.display="none";
  dialog.style.display="none";
 }

 function lgnInputOver(input){
  var act=document.getElementById(input);
  act.style.background="#ffcfa1";
  act.style.color="black";
 }

 function lgnInputOut(input){
  var act=document.getElementById(input);
  act.style.background="#ffb56c";
  act.style.color="white";
 }
